package routers

import (
	"golang-websocket-service/controllers"

	"github.com/gin-gonic/gin"
)

func ApiRouters(r *gin.Engine) {
	// 非权限路由
	v1UnauthGroupRouter := r.Group("/api/v1")
	{
		// 首页
		v1UnauthGroupRouter.GET("/", (&controllers.IndexController{}).Index)

		// 发送聊天消息
		v1UnauthGroupRouter.GET("/chat/index", (&controllers.ChatController{}).Index)

		// 发送广播消息
		v1UnauthGroupRouter.GET("/broadcast/index", (&controllers.BroadcastController{}).Index)
	}
}
